import Vue from "vue";
import ElementUI from "element-ui";
import App from "./App.vue";
import "element-ui/lib/theme-chalk/index.css"; // 引入element-ui样式

import router from "./router";
import store from "./store/index";
import "@/style/global.scss";
// import "bootstrap/dist/css/bootstrap.css"; // 引入bootstrap样式

Vue.use(ElementUI);

Vue.prototype.$message = ElementUI.Message; // 全局注册message组件

new Vue({
  store, // 将store注入Vue根实例，这样所有组件都能访问this.$store
  router, // 将路由注入Vue根实例，这样所有组件都能访问this.$router和this.$route
  render: (h) => h(App), //渲染跟组件
}).$mount("#app"); //挂载到id为app的DOM节点上
console.log("router instance:", router);
console.log("router beforeEach set up");
